import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import admin from './admin'
Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/desk/type/home' },
  {
    path: '/desk',
    name: 'desk',
    component: Home,
    children:[
      {
        path:'type/:type',
        component:()=>{return import('../components/contentList.vue')},
      },
      {
        path:'detail',
        component:()=>import('../components/detail.vue')
      },
    ]
  },
  
  ...admin
]

const router = new VueRouter({
  routes
})

export default router
